package com.home.homepage.controller.postFooter;

import com.eig.common.entity.homepageentity.postFooter.TbArticle;
import com.eig.common.vo.Result;
import com.home.homepage.service.postFooter.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：YQ袁（2446806940@qq.com）
 * @date ：Created in 2022/12/11 15:30
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/home/article")
public class ArtcileController {
    @Autowired
    private ArticleService articleService;
    @PostMapping("/updateArticleByNavId" )
    public Result updateArticleByNavId(@RequestBody TbArticle tbArticle){
            System.out.println(tbArticle.getNavId()+"@@@@@@@@@@@@@@@@@@@@");
        return articleService.updateArticleByNavId(tbArticle);
    }

    @PostMapping("/getArticleByNavId")
    private Result getArticleByNavId(@RequestBody TbArticle tbArticle){
        return articleService.getArticleByNavId(tbArticle);
    }
}
